//
//  TMingSe.m
//  W2MD
//
//  Created by zhudongwei on 14/12/12.
//  Copyright (c) 2014年 zhudongwei. All rights reserved.
//

#import "TMingSe.h"

@implementation TMingSe

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(void)showPeise:(NSArray*)peiseArr
{
    self.secColorLbl.text = @"";
    if ([peiseArr count]>0) {
        NSMutableString *text = [[NSMutableString alloc] init];
        for (int i =0; i <[peiseArr count]; i++) {
            NSMutableDictionary *valueDic = [peiseArr objectAtIndex:i];
            NSString *wenziValue = [valueDic objectForKey:@"desc"];
            NSString *d1Value = [wenziValue substringWithRange:NSMakeRange(0, 1)];
            [text appendString:d1Value];
            [text appendString:@" "];
        }
        
        self.secColorLbl.text = text;
        self.secColorLbl.textAlignment = NSTextAlignmentRight;
    }
}

-(void)showDesc:(NSMutableDictionary*)dicinfo
{
    NSMutableDictionary *zhuseDic = [dicinfo objectForKey:@"touming"];
    NSArray *valueArr = [zhuseDic allValues];
    [self showPeise:valueArr];

}

@end
